import java.util.Scanner;

public class demo {
    //方法
    public static void main(String[] args) {
        Scanner scan= new Scanner(System.in);
        int n=scan.nextInt();
        int ret=factor(n);
        System.out.println(n+"的递归值为"+ret);
    }
    public static int factor(int n){
        if(n==0||n==1)
        {
            return n;
        }
        else{
            return n*factor(n-1);
        }
    }
}
